package stream;

import reference.Student;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.stream.Stream;

/**
 * @author LiuYan
 * @date 2021/11/18 10:55
 */
public class Part05 {

    public static void main(String[] args) {
        // 1.可以通过Collection系列集合提供stream()或parallelStream()
        ArrayList<Student> list = new ArrayList<>();
        Stream<Student> stream = list.stream();

        // 2.通过Arrays中的静态方法stream()获取数组流
        Student[] students = new Student[10];
        Stream<Student> studentStream = Arrays.stream(students);

        // 3.通过Stream类中的静态方法of()
        Stream<String> a = Stream.of("a", "b", "c");


    }
}
